<?php

// define('filepath', 'c:\word.csv'); 

class FileHelper
{
	function getCsvFile($filepath)
	{
		$handle=null;
		$returnvalue=array();
		try
		{
			$handle = fopen($filepath,"r");
			while ($data = fgetcsv($handle, 1000, ",")) 
			{
				array_push($returnvalue,$data);
			}
			fclose($handle);
		}
		catch(Exception $e)
		{
			fclose($handle);
			$handle=null;
			die("Error!: ".$e->getMessage()."<br/>");
		}
		
		return $returnvalue;
	}

}




?>
